module adder_4(
 input  [3:0] a,
 input  [3:0] b,
 input Cin,
 output [3:0] S,
 output Cout
);

wire [3:0] t,g;
wire [4:0] h;

assign t[0]= a[0] | b[0];
assign g[0] = a[0] & b[0];
assign h[0]= Cin;
assign h[1]= g[0] | (1'b0 & h[0]);
assign S[0]= (t[0] ^ h[1]) | (g[0] & h[0] & 1'b0);
assign Cout = h[1];

endmodule

